import request from '@/utils/request'

// 查询询单列表
export function listOrder(query) {
  return request({
    url: '/guarantee/order/list',
    method: 'get',
    params: query
  })
}

// 查询询单列表
export function listCheckOrder(query) {
  return request({
    url: '/guarantee/order/listCheck',
    method: 'get',
    params: query
  })
}

// 查询询单详细
export function getOrder(id) {
  return request({
    url: '/guarantee/order/' + id,
    method: 'get'
  })
}

// 新增询单
export function addOrder(data) {
  return request({
    url: '/guarantee/order',
    method: 'post',
    data: data
  })
}

// 修改询单
export function updateOrder(data) {
  return request({
    url: '/guarantee/order',
    method: 'put',
    data: data
  })
}

// 审核询单
export function checkOrder(data) {
  return request({
    url: '/guarantee/order/check',
    method: 'post',
    data: data
  })
}

// 提交询单
export function tijiao(id) {
  var data = {id:id}
  return request({
    url: '/guarantee/order/tijiao/',
    method: 'post',
    data: data

  })
}
// 删除询单
export function delOrder(id) {
  return request({
    url: '/guarantee/order/' + id,
    method: 'delete'
  })
}

// 转入询单
export function zhuanOrder(id) {
  return request({
    url: '/guarantee/order/zhuanOrder/' + id,
    method: 'post'
  })
}

// 一键复制
export function copyAgreement(id) {
  return request({
    url: '/guarantee/order/copySave/' + id,
    method: 'get'
  })
}
